wordpress single post get category name

34

wordpress single post get category name -

$category = get_the_category();
$firstCategory = $category[0]->cat_name;

Comments

Submit
0 Comments